<!---
  * 查询 展开/收起按钮
  * 需要结合
  *
-->
<template>
  <a-button @click="() => (state = !state)" :class="{ isOpen: state, isClose: !state }">
    <template #icon>
      <DownOutlined v-if="!state" />
      <UpOutlined v-else />
    </template>
    {{ text }}
  </a-button>
</template>
<script setup lang="ts">
  const state = defineModel({
    type: Boolean,
    default: false,
  })
  const text = computed(() => (state.value ? '收起' : '展开'));
</script>
